package top.eggcode.system.modules.user.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import top.eggcode.common.base.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import java.time.LocalDateTime;

/**
 * Title: 用户
 * Description: 用户信息按信息类别进行了分表
 * Date: 2021/4/21 23:26
 *
 * @author JiaQi Ding
 * @version 1.0
 */
@ApiModel("用户信息")
@Data
@Table(name = "system_user")
@Entity
public class UserEntity extends BaseEntity {

    /* 安全 */

    @ApiModelProperty("邮箱")
    private String email;

    @JoinColumn
    @ApiModelProperty("手机")
    private String mobile;

    /* 基本资料 */

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("性别")
    private String sex;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("介绍")
    private String description;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("最后登录时间")
    private LocalDateTime lastLoginTime;
}
